<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/ymPrompt/ymPrompt_Ex.js"></script>
<link href="__THEME__/layout.css" rel="stylesheet" type="text/css" />
<link href="../Public/pop.css" rel="stylesheet" type="text/css" />

<body>
<script type="text/javascript">
    <!--
    //指定当前组模块URL地址
    var	URL		=	'__URL__';
    var	APP		=	'__APP__';
    var	PUBLIC	=	'__PUBLIC__';
    var	ROOT	=	'__ROOT__';
    //-->
</script>

<script>
    function addMedicine(categoryid) {
        var name = $.trim($("#name").val());
        if(!name){
        	ymPrompt.close();
            ymPrompt.alert("药品名称不能为空!");
            return;
        }
       // var gid  = $("#gid option:selected").val();
        $.post(APP+"/Index/addMedicine",{name:name,categoryid:categoryid},function(json){
        	var json = eval('('+json+')');
            if(json.status == 1){
            	ymPrompt.close();
            	ymPrompt.alert(json.info);
            }else{
				ymPrompt.alert(json.info);
            }
        });

    }
</script>

<div class="pop">
    <div class="con">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="height:120px;">
            <tr>
                <td>名称：<input type="text" id="name" name="name" value="" placeholder="请输入药品名称"></td>
            </tr>
           <!-- <tr id="f_group">
                <td>分组：</td>
                <td id="tishi"><select name="gid" id="gid">
                        <volist name="user_groups" id="g">
                            <option value="{$g.id}">{$g.name}</option>
                        </volist>
                </select></td>
            </tr>-->
        </table>
    </div>
    <div class="btm" id="f_button">
        <input name="input" type="button" class="btn_b" value="确 定"  onclick="addMedicine({$_GET['categoryid']})"/>
        <input name="input2" type="button" class="btn_w" value="取 消" onclick="ymPrompt.close();" />
    </div>
</div>

</body>
